<template>
  <div>
    <table-view :data="tableData" header-cell-class-name="table-header" size="medium">
      <el-table-column prop="distributeInfoResp.distributeName" label="配送商名称" align="center" :show-overflow-tooltip="true" />
      <el-table-column prop="distributeInfoResp.distributeNo" label="配送商编号" align="center" :show-overflow-tooltip="true" />
      <el-table-column prop="distributeInfoResp.distributeName" label="所在地区" align="center" :show-overflow-tooltip="true">
        <template #default="{row}">
          {{ row?.distributeInfoResp?.provinceName }}/{{ row?.distributeInfoResp?.cityName }}/{{ row?.distributeInfoResp?.areaName }}
        </template>
      </el-table-column>
      <el-table-column prop="amount" label="订单总金额(元)" align="center" :show-overflow-tooltip="true">
        <template #default="{row}">
          <div style="text-align: right">
            {{ isInteger(row.amount) }}
          </div>
        </template>
      </el-table-column>
    </table-view>
  </div>
</template>

<script>
import {getCurrentInstance, reactive, toRefs} from 'vue'

export default {
  name: 'Index',
  props: {
    tableData: {
      type: Array,
      default: []
    }
  },
  setup(props, context) {
    const currentInstance = getCurrentInstance()
    var data = reactive({})

    return {
      ...toRefs(data)
    }
  }
}
</script>

<style scoped>
  /* @import url(); 引入css类 */
</style>
